<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<script>
	$(document)
			.ready(
					function() {
						var _form = $("#semesterForm").validate();
						//返回
						$('#btnBack').click(function() {
							document.semesterForm.action = "${basePath}/semesterSummary/recommendStudentIndex";
							document.semesterForm.submit();
										
					  });
						//返回
						$('#btnBack2').click(function() {
							document.semesterForm.action = "${basePath}/semesterSummary/recommendStudentIndex";
							document.semesterForm.submit();
										
					  });
						
						//保存
						$("#btnSave")
								.click(
										function() {
											if (_form.form()) {
												if (validateSqxm()) {
													getReCommendStudentScoreConductCount();
												}
											}
										});
						 //选择
						$("#div1").dialog({
							width : 'auto',
							height : 'auto',
							bgiframe : true,
							modal : true,
							draggable : true,
							resizable : false,
							title : '选择学生',
							autoOpen : false,
						    buttons : {
						    '取消' : function() {
						    	$(this).dialog('close');
							},
							'确定' : function() {
							  if($("#fromSelect").val()==null||$("#fromSelect").val()==""){
								 layer.alert("必须选择一项", {icon: 6});
								 return false;
							  }else{
							    var formSelect = document.getElementById("fromSelect");
							    var str = [];
							    var num=0;
							    for(i=0;i<formSelect.length;i++){
							        if(formSelect.options[i].selected){
							            //str.push(select[i].value);
							            num++;
							        }
							    }
							    if(num>=2){
							     layer.alert("只能选择一项", {icon: 6});
							      return false;
							    }else{
							    	var result = $.parseJSON($("#studentListJson").val());
							    	var xsid=$("#fromSelect").val();
									for (var i = 0; i < result.length; i++) {
										if(xsid==result[i]["xsid"]){
										 $("#xh").val(result[i]["xh"]);
										 $("#xm").val(result[i]["xm"]);
										 $("#xb").val(result[i]["xb"]);
										 $("#bjmc").val(result[i]["bjmc"]);
										 $("#zymc").val(result[i]["zymc"]);
										 $("#njmc").val(result[i]["njmc"]);
										 $("#stuid").val(xsid);
										 $("#bjid").val(result[i]["bjid"]);
										// compareListValue(document.getElementById('zzmm'),result[i].zzmm);
										 break;
										}
									}
									getRecommendStudentScore(xsid);
									  $(this).dialog('close');
							    }
							  }							  
							}
						  }
						});
						
					});
	function validateSqxm() {
		var p1 = $('input[name="p"]:checked').val();
		var p21 = $('input[name="p21"]:checked').val();
		var p22 = $('input[name="p22"]:checked').val();
		var bool = false;
		if (p1 != null && p1 != "") {
			bool = true;
		}
		if (p21 != null && p21 != "") {
			bool = true;
		}
		if (p22 != null && p22 != "") {
			bool = true;
		}
		if (bool == false) {
			layer.alert("本学期您想申请的先进项目至少选一项", {
				icon : 6
			});
			return false;
		}
		return bool;
	}
	  function showStudentDiv(){
		  var p1 = $('input[name="p"]:checked').val();
		  var p21 = $('input[name="p21"]:checked').val();
		  var p22 = $('input[name="p22"]:checked').val();
		  if(p1==null&&p21==null&&p22==null){
			  clearData(); 
			  $("#fromSelect").empty();
			  $("#sourseFromSelect2").empty();
		  }
		  if(p1!=null &&p21==null&&p22==null){
			  checkOption(p1);  
		  }else if(p1!=null &&p21!=null&&p22==null){
			  checkOption(p21);  
		  }else if(p1!=null &&p21!=null&&p22!=null){
			  checkOption(p22);   
		  }else if(p1==null&&p21!=null&&p22!=null){
			  checkOption(p22); 
		  }else if(p1==null&&p21!=null&&p22==null){
			  checkOption(p21); 
		  }else if(p1==null&&p21==null&&p22!=null){
			  checkOption(p22); 
		  }else if(p1!=null &&p21==null&&p22!=null){
			  checkOption(p22); 
		  }
	    	$('#div1').dialog('open');	
	    }
	  function checkOption(value){
		  optionRadion();
	      var pytype2=null;
	      var pytype3=null;
	      var pytype=null;
	      var flag1=0;
	      var flag2=0;
	      var flag3=0;
	      var p21=$('input[name="p21"]:checked').val();
	      var p22=$('input[name="p22"]:checked').val();
	      var p=$('input[name="p"]:checked').val();
	      if(p21!=null){
	    	  flag2=1;  
	      }
	      if(p22!=null){
	    	flag3=1;    
	      }
	      if(p!=null){
	    	if(p=="三好学生"){
	         flag1=3;	
	    	}else if(p=="好学生"){
	    	flag1=2;	
	    	}else if(p=="行为达标生"){
	    	flag1=1;	
	    	}
	      }
	     if("三好学生"==value){
	    	 clearData();
	    	 pytype=3;
	     }else if("好学生"==value){
	    	 clearData();
	    	 pytype=2;
	     }else if("行为达标生"==value){
	    	 clearData();
	    	pytype=1;
	     }else if("优秀班干部"==value){
	     //  var p21=$('input[name="p21"]:checked').val();
	     //  var p22=$('input[name="p22"]:checked').val();
	       clearData();
	       if(p21!=null&&p22==null){
	    	   pytype2=4;
	    	   pytype3=null;
	       }else if(p21==null&&p22!=null){
	    	   pytype3=5;
	    	   pytype2=null;
	       }else if(p21!=null&&p22!=null){
	    	   pytype2=6;
	    	   pytype3=6;
	       }
	     }else if("技能特长生"==value){
	    	// var p21=$('input[name="p21"]:checked').val();
	        // var p22=$('input[name="p22"]:checked').val();
	         clearData();
	         if(p21!=null&&p22==null){
	      	 pytype2=4;
	      	pytype3=null;
	         }else if(p21==null&&p22!=null){
	      	 pytype3=5;
	      	pytype2=null;
	         }else if(p21!=null&&p22!=null){
	        	 pytype3=6;
	        	 pytype2=6;
	         }
	     }
	     if(pytype!=null&&pytype2==null&&pytype3==null){
	    	 $("#pytype").val(pytype); 
	     }else if(pytype!=null&&pytype2!=null&&pytype3==null){
	    	 $("#pytype").val(pytype2); 
	     }else if(pytype!=null&&pytype2==null&&pytype3!=null){
	    	 $("#pytype").val(pytype3);
	     }else if(pytype!=null&&pytype2!=null&&pytype3!=null){
	    	 $("#pytype").val(pytype3); 
	     }else if(pytype==null&&pytype2!=null&&pytype3==null){
	    	 $("#pytype").val(pytype2); 
	     }else if(pytype==null&&pytype2!=null&&pytype3!=null){
	    	 $("#pytype").val(pytype3); 
	     }else if(pytype==null&&pytype2==null&&pytype3!=null){
	    	 $("#pytype").val(pytype3); 
	     }
	      //处理数据
	     $.getJSON("${basePath}/common/getSemesterByStudentConductList?now="+new Date().getTime(),{pytype:$("#pytype").val(),semid :$("#semid").val(),ismanager:$("#ismanager").val(),tjid:$("#tjid").val(),p:flag1,p21:flag2,p22:flag3},function(data){
				$("#fromSelect").empty();
				$("#sourseFromSelect2").empty();
				//var defaultVal = '';
				//var defaultText = '\u5168\u90e8';
				var _options='';
				//_options=_options+"<option value="+defaultVal+">"+defaultText+"</option>";
				$("#studentListJson").val(JSON.stringify(data));
				for(var i=0;i<data.length;i++){
				 	var val = data[i]["xsid"];
				 	var text = data[i]["xm"];
				 	_options=_options+"<option value="+val+">"+text+"</option>";
				 }
				 $("#fromSelect").html(_options);
			     $("#sourseFromSelect2").html(_options);
			}); 
	    }
	    function getRecommendStudentScore(xsid){
	    	 //处理选择学生的各科课程的成绩
			 var html1="",html2="";
	      $.getJSON("${basePath}/common/getSemesterStudentScoreConductList?xsid="+xsid,{semid:$("#semid").val()},
	      function(data){
			for(var i=0;i<data.length;i++){
				var kcmc=data[i]["kcmc"]=="undefined" ? "" :data[i]["kcmc"];
				var scorevalue=data[i]["scorevalue"]=="undefined" ? "" :data[i]["scorevalue"];
				html2=html2+"<tr><td class='table-contentTD' style='text-align: center;'>"+(i+1)+"</td><td class='table-contentTD' style='text-align: center;'>"+kcmc+"</td><td class='table-contentTD' style='text-align: center;'>"+scorevalue+"</td></tr>";
			 }
			html1="<table cellpadding='0' cellspacing='0' border='0' class='table-border' width='99%'><tr><td class='table-titleTD' style='text-align: center;'>序号</td><td class='table-titleTD' style='text-align: center;'>课程</td><td class='table-titleTD' style='text-align: center;'>成绩</td></tr>";
			 $("#table_course").html(html1+html2);
			});  	
	    }
	    function getReCommendStudentScoreConductCount(){
	    	 var p21=$('input[name="p21"]:checked').val()==null? "":$('input[name="p21"]:checked').val();
		     var p22=$('input[name="p22"]:checked').val()==null? "":$('input[name="p22"]:checked').val();
		    var pxxm=$('input[name="p"]:checked').val()==null ?"" :$('input[name="p"]:checked').val();
	    	//var pxxm=$("#p").val()==null ?"" :$("#p").val();
	    	//var p21=$("#p21").val()==null ?"" :$("#p21").val();
	    	//var p22=$("#p22").val()==null?"":$("#p22").val();
	    	if(pxxm!=""||p21!=""||p22!=""){
	   		$.ajax({
	               type: "post",
	               url: "${basePath}/common/getReCommendStudentScoreConductCount",
	               data: { bjid :$("#bjid").val(),semid:$("#semid").val(),pxxm1:pxxm,p21:p21,p22:p22},
	              /* dataType: "json",*/
	               success: function(data){
	            	   if(data=="1"){
//             		   $("#btnSave").attr(
// 								"disabled",
// 								"disabled");
            			document.semesterForm.action = "${basePath}/semesterSummary/modiftyRecommendStudent";
						document.semesterForm.submit();
	       		  		//document.semesterForm.action ="${basePath}/semesterSummary/addRecommendStudent";
	       		  		//document.semesterForm.submit();  
	       		      }else{
	       		    	var arrTypes=["三好学生","好学生","行为达标生","优秀班干部","技能特长生"];
	       		    	var arrTypesRate=[15,15,80,1,2];
	       		       if(data=="2"){
	       		    	   layer.alert(arrTypes[0]+"评审项目推荐学生数不能超过班级总人数的"+arrTypesRate[0]+"%", {icon: 6});
	        		       return false;	     
	       		       }else if(data=="3"){
	       		    	 layer.alert(arrTypes[1]+"评审项目推荐学生数不能超过班级总人数的"+arrTypesRate[1]+"%", {icon: 6});
	      		       return false;   
	       		       }else if(data=="4"){
	       		   	 	layer.alert(arrTypes[2]+"评审项目推荐学生数不能超过班级总人数的"+arrTypesRate[2]+"%", {icon: 6});
	    		       return false;     
	       		       }else if(data=="5"){
	       		    	layer.alert(arrTypes[3]+"评审项目每个班级推荐学生数不能超过"+arrTypesRate[3]+"人", {icon: 6});
	     		       return false;     
	       		       }else if(data=="6"){
	       		    	layer.alert(arrTypes[4]+"评审项目每个班级推荐学生数不能超过"+arrTypesRate[4]+"人", {icon: 6});
	      		       return false;     
	       		       }else{
	       		        layer.alert("服务器发生异常", {icon: 6});
	        		    return false;
	       		       }	  
	       		      }      
	               }
	  	   		}); 	
	    	}else{
	    		  layer.alert("评审项目至少选一项", {icon: 6});
	    		  return false;
	    		//document.semesterForm.action = "${basePath}/semesterSummary/modiftyRecommendStudent";
				//document.semesterForm.submit();
	    	}
	    }
	    
	    function clearData(){
	     $("#xm").val("");
	     $("#stuid").val("");
	     $("#xh").val("");
	     $("#xb").val("");
	     $("#bjmc").val("");
	     $("#bjid").val("");
	     $("#zymc").val("");
	     $("#njmc").val("");
	     $("#table_course").html("");
	    }
	 	function optionRadion(){
			  var old = null; //用来保存原来的对象
			    $("input[name='p']").each(function(){//循环绑定事件
			        if(this.checked){
			            old = this; //如果当前对象选中，保存该对象
			        }
			        this.onclick = function(){
			            if(this == old){//如果点击的对象原来是选中的，取消选中
			                this.checked = false;
			                old = null;
			                clearData();
			                $("#fromSelect").empty();
			        		$("#sourseFromSelect2").empty();
			            } else{
			                old = this;
			            }
			        }
			    });
		}
	       
</script>
</head>
<body onload="javascript:viewOrEdit();">
<input type="hidden" id="studentListJson" name="studentListJson" value=""/>
	<form action="#" id="semesterForm" name="semesterForm">
		 <input
			type="hidden" id="tjid" name="tjid" value="${recommendStudent.tjid}" />
		<input type="hidden" id="pytype" name="pytype" value=""/>
		<input  type="hidden" id="ismanager" name="ismanager" value="${ismanager}"/>
		<input  type="hidden" id="bzr" name="bzr" value="${ismanager}"/>
		<div id="view">
			<table cellpadding="0" cellspacing="0" border="0"
				class="table-border" width="95%">
				<tr>
					<td class="table-header" colspan="6">期末评比推荐表</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%">姓名：</td>
					<td class="table-contentTD" style="width: 22%">${student.xm}</td>
					<td class="table-titleTD" style="width: 12%">学号：</td>
					<td class="table-contentTD" style="width: 22%">${student.xh}</td>
					<td class="table-titleTD" style="width: 12%">性别：</td>
					<td class="table-contentTD" style="width: 22%">${student.xb}</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%">班级：</td>
					<td class="table-contentTD" style="width: 22%">${student.bjmc}</td>
					<td class="table-titleTD" style="width: 12%">专业：</td>
					<td class="table-contentTD" style="width: 22%">${student.zymc}</td>
					<td class="table-titleTD" style="width: 12%">年级：</td>
					<td class="table-contentTD" style="width: 22%">${student.njmc}</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%">学期：</td>
					<td class="table-contentTD"><c:forEach items="${semesterList}"
							var="semester">
							<c:if test="${recommendStudent.semid==semester.xqid}">
					  ${semester.xqmc}
					  </c:if>
						</c:forEach></td>
					<td class="table-titleTD" style="width: 12%">登记时间：</td>
					<td class="table-contentTD" colspan="3">
					<fmt:formatDate value="${recommendStudent.createtime}" pattern="yyyy-MM-dd hh:mm:ss" />
					</td>
				</tr>
				<tr>
					<td class="table-titleTD" colspan="6" style="text-align: left;">本学期评审项目：</td>
				</tr>
				<tr>
					<td colspan="6" class="table-contentTD" style="color: #000000">
						<c:choose>
							<c:when test="${not empty recommendStudent.pxxm1 && recommendStudent.pxxm1=='三好学生'}">
								<label><input type="radio" value="三好学生" 
									 checked="checked" disabled="disabled" />三好学生</label>
							</c:when>
							<c:otherwise>
								<label><input type="radio" value="三好学生" 
								 disabled="disabled" />三好学生</label>
							</c:otherwise>
						</c:choose> <c:choose>
							<c:when test="${not empty recommendStudent.pxxm1 && recommendStudent.pxxm1=='好学生'}">
								<label><input type="radio" value="好学生"
									checked="checked" disabled="disabled" />好学生</label>
							</c:when>
							<c:otherwise>
								<label><input type="radio" value="好学生" 
									disabled="disabled" />好学生</label>
							</c:otherwise>
						</c:choose> <c:choose>
							<c:when test="${not empty recommendStudent.pxxm1 && recommendStudent.pxxm1=='行为达标生'}">
								<label><input type="radio" value="行为达标生" 
									 checked="checked" disabled="disabled" />行为达标生</label>
							</c:when>
							<c:otherwise>
								<label><input type="radio" value="行为达标生" 
									 disabled="disabled" />行为达标生</label>
							</c:otherwise>
						</c:choose> <c:choose>
							<c:when test="${not empty p21 && p21=='优秀班干部'}">
								<label><input type="checkbox" 
									value="优秀班干部" checked="checked" disabled="disabled" />优秀班干部</label>
							</c:when>
							<c:otherwise>
								<label><input type="checkbox" 
									value="优秀班干部" disabled="disabled" />优秀班干部</label>
							</c:otherwise>
						</c:choose> <c:choose>
							<c:when test="${not empty p22&& p22=='技能特长生'}">
								<label><input type="checkbox" 
									value="技能特长生" checked="checked" disabled="disabled" />技能特长生</label>
							</c:when>
							<c:otherwise>
								<label><input type="checkbox"
									value="技能特长生" disabled="disabled" />技能特长生</label>
							</c:otherwise>
						</c:choose>
					</td>
				</tr>
				<tr>
		   		 <td class="table-titleTD" style="width: 12%">学期成绩：</td>
				<td colspan="5" class="table-contentTD" id="table_course">
				 <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="100%">
				 <tr><td class="table-titleTD" style="text-align: center;">序号</td>
				 <td class="table-titleTD" style="text-align: center;">课程</td>
				 <td class="table-titleTD" style="text-align: center;">成绩</td>
				 </tr>
				 <c:forEach items="${studentCourseScoreList}" var="studentScore" varStatus="status">
				 <tr><td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
				 <td class="table-contentTD" style="text-align: center;">${studentScore.kcmc=='undefined' ? "" :studentScore.kcmc}</td>
				 <td class="table-contentTD" style="text-align: center;">${studentScore.scorevalue}</td>
				 </tr>
				 </c:forEach>
				 </table>
				</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%">主要事迹：</td>
					<td colspan="5" class="table-contentTD"><textarea 
							style="width: 90%; height: 80px;"
							 disabled="disabled">${recommendStudent.zysj}</textarea>
					</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%">班委意见：</td>
					<td colspan="5" class="table-contentTD"><textarea 
							style="width: 90%; height: 80px;" 
							disabled="disabled">${recommendStudent.bwyj}</textarea></td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%">班主任意见：</td>
					<td colspan="5" class="table-contentTD"><textarea 
							 style="width: 90%; height: 80px;" 
							disabled="disabled">${recommendStudent.bzryj}</textarea></td>
				</tr>
			</table>
		</div>
		<div id="edit" style="display: none;">
			<table cellpadding="0" cellspacing="0" border="0"
				class="table-border" width="95%">
				<tr>
					<td class="table-contentTD" style="text-align: left;color:red;font-weight: bold;border: 0" colspan="6">说明：请您先选择评选项目后在选择参评的学生</td>
				</tr>
				<tr>
					<td class="table-header" colspan="6">期末评比推荐表</td>
				</tr>
			<tr>
			<td class="table-titleTD" colspan="6" style="text-align: left;"><font color="red">*</font>本学期评审项目：</td>
			</tr>
			<tr>
			 <td colspan="6" class="table-contentTD" style="color: #000000" >
			 <c:choose>
			  <c:when test="${not empty recommendStudent.pxxm1 && recommendStudent.pxxm1=='三好学生'}">
			   <label><input type="radio" value="三好学生" id="p" name="p" checked="checked" onclick="checkOption(this.value);"/>三好学生</label>
			  </c:when>
			 <c:otherwise>
			   <label><input type="radio" value="三好学生" id="p" name="p" onclick="checkOption(this.value);"/>三好学生</label>
			 </c:otherwise>
			 </c:choose>
			  <c:choose>
			  <c:when test="${not empty recommendStudent.pxxm1 && recommendStudent.pxxm1=='好学生'}">
			   <label><input type="radio" value="好学生" id="p" name="p" checked="checked" onclick="checkOption(this.value);"/>好学生</label>
			  </c:when>
			 <c:otherwise>
			   <label><input type="radio" value="好学生" id="p" name="p" onclick="checkOption(this.value);"/>好学生</label>
			 </c:otherwise>
			 </c:choose>
			   <c:choose>
			  <c:when test="${not empty recommendStudent.pxxm1 && recommendStudent.pxxm1=='行为达标生'}">
			   <label><input type="radio" value="行为达标生" id="p" name="p" checked="checked" onclick="checkOption(this.value);"/>行为达标生</label>
			  </c:when>
			 <c:otherwise>
			   <label><input type="radio" value="行为达标生" id="p" name="p" onclick="checkOption(this.value);"/>行为达标生</label>
			 </c:otherwise>
			 </c:choose>
			 <c:choose>
			  <c:when test="${not empty p21 && p21=='优秀班干部'}">
			  <label><input  type="checkbox" id="p21" name="p21" checked="checked" value="优秀班干部" onclick="checkOption(this.value);" />优秀班干部</label>
			  </c:when>
			 <c:otherwise>
			 <label><input  type="checkbox" id="p21" name="p21" value="优秀班干部" onclick="checkOption(this.value);" />优秀班干部</label>
			 </c:otherwise>
			 </c:choose>
			 <c:choose>
			  <c:when test="${not empty p22 && p22=='技能特长生'}">
			  <label><input  type="checkbox" id="p22" name="p22" checked="checked" value="技能特长生" onclick="checkOption(this.value);" />技能特长生</label>
			  </c:when>
			 <c:otherwise>
			 <label><input  type="checkbox" id="p22" name="p22" value="技能特长生" onclick="checkOption(this.value);" />技能特长生</label>
			 </c:otherwise>
			 </c:choose>			 
			 </td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 12%"><font color="red">*</font>姓名：</td>
				<td class="table-contentTD" style="width: 22%"><input type="text" id="xm" name="xm" value="${student.xm}" placeholder="请输入姓名" sty   autocomplete="off" readonly="readonly" class="required inputText2"/>&nbsp;&nbsp;
				<input type="button" id="optionBtn" value="选择" class="inputButton"
					onclick="javascript:showStudentDiv();" readonly="readonly"/>
				<input type="hidden" id="stuid" name="stuid" value="${student.xsid}"/>
				</td>
				<td class="table-titleTD"  style="width: 12%">学号：</td>
				<td class="table-contentTD" style="width: 22%"><input type="text" id="xh" name="xh" value="${student.xh}" autocomplete="off" readonly="readonly" class="inputText"></td>
				<td class="table-titleTD" style="width: 12%">性别：</td>
				<td class="table-contentTD" style="width: 22%"><input type="text" id="xb" name="xb" value="${student.xb}" autocomplete="off" readonly="readonly" class="inputText"></td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 12%">班级：</td>
				<td class="table-contentTD" style="width: 22%"><input type="text" value="${student.bjmc}" id="bjmc" name="bjmc" readonly="readonly" class="inputText">
				<input type="hidden" id="bjid" name="bjid" value="${student.bjid}"/></td>
				<td class="table-titleTD" style="width: 12%">专业：</td>
				<td class="table-contentTD" style="width: 22%"><input type="text" value="${student.zymc}" id="zymc" name="zymc" readonly="readonly" class="inputText"></td>
				<td class="table-titleTD" style="width: 12%">年级：</td>
				<td class="table-contentTD" style="width: 22%"><input type="text" value="${student.njmc}" id="njmc" name="njmc" readonly="readonly" class="inputText"></td>
			</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%"><font color="red">*</font>学期：</td>
					<td class="table-contentTD"><select id="semid" name="semid" class="required selectList" placeholder="请选择学期" onchange="clearData();" >
							<option value="">请选择</option>
							<c:forEach items="${semesterList}" var="semester">
								<option value="${semester.xqid}">${semester.xqmc}</option>
							</c:forEach>
					</select></td>
					<td class="table-titleTD" style="width: 12%"><font color="red">*</font>登记时间：</td>
					<td class="table-contentTD" colspan="3"><input type="text" value="<fmt:formatDate value="${recommendStudent.createtime}" pattern="yyyy-MM-dd hh:mm:ss" />" id="desj" name="desj" class="Wdate text inputText2 required" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly"></td>
				</tr>
				<tr>
		   		 <td class="table-titleTD" style="width: 12%">学期成绩：</td>
				<td colspan="5" class="table-contentTD" id="table_course">
				 <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="100%">
				 <tr><td class="table-titleTD" style="text-align: center;">序号</td>
				 <td class="table-titleTD" style="text-align: center;">课程</td>
				 <td class="table-titleTD" style="text-align: center;">成绩</td>
				 </tr>
				 <c:forEach items="${studentCourseScoreList}" var="studentScore" varStatus="status">
				 <tr><td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
				 <td class="table-contentTD" style="text-align: center;">${studentScore.kcmc=='undefined' ? "" :studentScore.kcmc}</td>
				 <td class="table-contentTD" style="text-align: center;">${studentScore.scorevalue}</td>
				 </tr>
				 </c:forEach>
				 </table>
				</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%"><font color="red">*</font>主要事迹：</td>
					<td colspan="5" class="table-contentTD"><textarea id="zysj" name="zysj" 
							style="width: 90%; height: 80px;" placeholder="请输入主要事迹" class="required">${recommendStudent.zysj}</textarea>
					</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%"><font color="red">*</font>班委意见：</td>
					<td colspan="5" class="table-contentTD"><textarea id="bwyj" name="bwyj" 
							style="width: 90%; height: 80px;" placeholder="请输入班委意见" class="required">${recommendStudent.bwyj}</textarea></td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 12%"><font color="red">*</font>班主任意见：</td>
					<td colspan="5" class="table-contentTD"><textarea id="bzryj" name="bzryj" class="required"
							 style="width: 90%; height: 80px;" placeholder="请输入班主任意见">${recommendStudent.bzryj}</textarea></td>
				</tr>
			</table>
		</div>
		<br />
		<div id="button-view">
			<table cellpadding="1" cellspacing="1" border="0" align="left">
				<tr>
				<c:if test="${_login_user_type==2 and ismanager==1}">
					<kl:permission permisstionList="${permisstionList}" currentUser="${_login_console_user}" currentCatalogId="<%=CatalogUtils.getCatalogId(\"XGGL_QMPB_TJB\")%>" key="modify">
					<td><input type="button" id="btnEdit" autocomplete="off"  class="inputButton"
						style="text-align: center;" value="修改"
						onclick="javascript:gotoEditPage();" /></td>
 					</kl:permission> 
					</c:if>
					<td><input type="button" id="btnBack" autocomplete="off"  class="inputButton"
						value="返回" style="text-align: center;" /></td>
				</tr>
			</table>
		</div>
		<div id="button-edit">
			<table cellpadding="1" cellspacing="1" border="0" align="left">
				<tr>
					<td><input type="button" id="btnSave" autocomplete="off"  class="inputButton"
						style="text-align: center;" value="保存" /></td>
					<td><input type="button" id="cancelSave" autocomplete="off"  class="inputButton"
						style="text-align: center;" value="取消"
						onclick="javascript:gotoViewPage();" /></td>
					<td><input type="button" id="btnBack2" autocomplete="off"  class="inputButton"
						value="返回" style="text-align: center;" /></td>
				</tr>
			</table>
		</div>
<div id="div1" style="display: none;">
			<table cellpadding="0" cellspacing="0" border="0" class="table-border">
				  <tr>
				  	 <td style="clear:both; width: 70%">
				  	  <input class="text" name="searchemp" ondblclick="javascript:filterSelectItems('sourseFromSelect2','fromSelect','fromSelect',this.value);"  onkeyup="javascript:filterSelectItems('sourseFromSelect2','fromSelect','fromSelect',this.value);"/><font color="green">在此查找</font> <br/>
				  	   <br/><label style="color:red;">未选中:</label><br/>
				  	   <select name="fromSelect" id="fromSelect" multiple="multiple"  size="1"  multiple="false" style="width:200px; height: 250px;"
							ondblclick="moveField('fromSelect','toSelect');">
											<c:forEach items="${studentList}" var="data">
									       <option value="${data.xsid}">${data.xm}</option>
								          </c:forEach>
						</select>
							<select name="sourseFromSelect2" id="sourseFromSelect2"   multiple="false" style="width: 220px; height: 150px; display: none;" >
										  <c:forEach items="${studentList}" var="data">
									       <option value="${data.xsid}">${data.xm}</option>
								          </c:forEach>
  	    </select>
						
					 </td>
  	              </tr>
			</table>
		</div>
	</form>
</body>
<script type="text/javascript">
	compareListValue(document.getElementById('semid'),
			'${recommendStudent.semid}');
	 if("${msg}"!=""){
	       layer.alert("${msg}", {icon: 6});
	  } 
</script>
</html>
